﻿using UnityEngine;
using System;

namespace GameBasic
{
    /// <summary>
    /// Used on int or struct{type: int, value: float}
    /// </summary>
    public class EnumDataAttribute : PropertyAttribute
    {
        public Type enumType;

        /// <summary>
        /// Int property name
        /// </summary>
        public string typeProperty;

        /// <summary>
        /// Flaot value property name
        /// </summary>
        public string valueProperty;

        public EnumDataAttribute(string typePropertyName = null, string valuePropertyName = null)
        {
            this.typeProperty = typePropertyName;
            this.valueProperty = valuePropertyName;
        }

        public EnumDataAttribute(Type enumType, string typePropertyName = null, string valuePropertyName = null)
        {
            this.enumType = enumType;
            this.typeProperty = typePropertyName;
            this.valueProperty = valuePropertyName;
        }
    }
}